<template>
  <div class="content">
      <div class="classPage">
        <a href="" v-for="item in subject" :key="item.id">
          <img :src="item.cover" alt="">
        </a>
      </div>
  </div>
</template>

<script lang="ts">
import {defineComponent} from "vue";

export default defineComponent({
  name: "theme",
});
</script>

<script setup lang="ts">
import {reqSubject} from "@/apis/source";
import {onMounted, ref} from "vue";

const pageSize = ref<number>(10)

const subject = ref<any>(null)

onMounted(()=>{
  getSubject()
})

const getSubject = async ()=>{
  const res = await reqSubject(pageSize.value)
  subject.value = res.content
}
</script>

<style scoped lang="scss">
.content{
  width: 1400px;
  margin: 40px auto;
  .classPage{
    display: flex;
    flex-wrap: wrap;
    margin-left: 74px;
    img{
      width: 286px;
      height: 156px;
      margin-left: 20px;
      margin-bottom: 20px;
    }
  }
}
</style>
